Learning Flex Basics (Part 3) : Working with Containers
Table of Contents
- Introduction
- Building the Containers
- Create the Application Object
- Create a Data Array
- Add a TabNavigator Container for Global Navigation
- Add an HBox and Panel Containers for Main Views
- Add a ViewStack, LinkBar, and Panel Containers for Secondary Views
- Add a Form Container
- Add a Tile Layout Container and Populate It Using a Repeater
- Create a Pseudo Bar Chart Using a Repeater and VBoxes
- Complete Code Listing for containers.mxml
- Where to Go from Here
Create the Application Object
To begin any Flex application, start with an XML declaration and an Application
block. The Application tag will include a namespace declaration for the
MX class library: xmlns:mx="http://www.macromedia.com/2003/mxml". The mx prefix is used with all tags for
this library.
- Create a new file and save it as containers.mxml in the flex_tutorials directory.
-
At the beginning of the file, insert the XML declaration:
<?xml version="1.0">
-
After the XML declaration, add an
Applicationtag with the MXML namespace:<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"> </mx:Application>